// 路由-相关模块
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
import Home from '@/views/Home'
import Layout from '@/views/Layout'
import Search from '@/views/Search'
//第一步路由
const routes = [
    {
        path: '/',
        redirect: '/Layout',
    },
    {
        path: '/Layout',
        component: Layout,
        redirect:'/Layout/Home',
        children:[
            {
                path: 'Home',
                component: Home,
                meta:{
                    title:'首页',
                }
            },  
            {
                path: 'Search',
                component: Search,
                meta:{
                    title:'搜索',
                }
            },
        ]
    },
]

const router=new VueRouter({
    routes,
})

export default router